/*
 * File Name：MPAction.java
 * Copyright：Copyright 2008-2014 CiWong.Inc. All Rights Reserved.
 * Description： MPAction.java
 * Modify By：bin
 * Modify Date：2014年4月7日
 * Modify Type：Add
 */
package com.ciwong.mobilepay.util;

import com.ciwong.libs.utils.volley.BaseRequest.CWAction;

/**
 * 移动支付网络请求接口
 *
 * @author bin
 * @version ciwong v.1.0 2014年4月7日
 * @since ciwong v.1.0
 */
public class MPAction implements CWAction {
    /**
     * 网络请求站点
     */
    public static final String HOST = "https://eapi.ciwong.com/gateway";
//    public static final String HOST = "http://eapi.ciwong.com/gateway";

    /**
     * 获取用户账户支付信息
     */
    // public static final String USER_BALANCE =
    // "http://api.xixin61.com/v2/pay/user/Balance";

    public static final String USER_BALANCE = HOST + "/v6/pay/epapepay/balance";///v6/pay/epapepay/balance
    ///v5/pay/user/Balance

    /**
     * 验证习币支付密码
     */
    public static final String PASSWORD_VERIFY = HOST
            + "/v5/pay/service/VerifyUserPayPassword";

    // public static final String PASSWORD_VERIFY =
    // "http://192.168.1.61:8025/UnionPay/passwordAuth";

    /**
     * 银联获取订单号
     */
    public static final String CW_TN_URL = "http://mobilepay.ciwong.com/UnionPay/purchase";

    /**
     * 银联查询接口
     */
    public static final String UNION_PAY_QUERY = "http://mobilepay.ciwong.com/UnionPay/query";

    /**
     * 说明:获取冲值订单流水号及預付编号
     */
    public static final String GET_WEIXIN_UNIFIED_ORDER = HOST
            + "/v5/pay/PayRecharge/GetWeixinUnifiedOrder";

    /**
     * (十三) 获取冲值订单流水号(支付宝)
     */
    public static final String GET_INSERT_USER_PAY_IN_RECORD = HOST
            + "/v5/pay/PayRecharge/InsertUserPayInRecord";

    /**
     * 支付宝APP数字签名
     */
    public static final String GET_ALIPAY_MOBILE_SIGN = HOST
            + "/v6/pay/epapepay/getalipaymobilesign";///v6/pay/epapepay/getalipaymobilesign///v5/pay/PayRecharge/GetAlipayMobileSign

    /**
     * 支付宝,用户冲值记录
     */
    public static final String GET_GET_RECHARGE_INFO = HOST
            + "/v6/pay/epapepay/getrechargeinfo";///v5/pay/User/GetRechargeInfo

    /**
     * 获取充值订单流水号并是否直接购买服务
     */
    public static final String GET_UNIFIED_ORDER = HOST
            + "/v6/pay/epapepay/bealone";///v6/pay/epapepay/bealone	///v5/pay/EpapePay/Bealone

    /**
     * 教辅云服务购买参数数字签名
     */
    public static final String SET_EPAGE_SERVICE_ORDER = HOST + "/v5/service/v2/set_epage_service_order";//http://test.eapi.ciwong.com

    /**
     * 教辅云服务购买参数数字签名(含优惠券)
     */
    public static final String SET_EPAGE_SERVICE_ORDER_BY_COUPON = HOST + "/v5/service/v2/set_epage_service_order_by_coupon";//http://test.eapi.ciwong.com

    /**
     * 教辅云服务购买参数数字签名
     */
//    public static final String SET_EPAGE_SERVICE_ORDER = HOST+"/v5-beta/service/v2/set_epage_service_order";//http://test.eapi.ciwong.com


    /**
     * 习币购买新接口
     */
    public static final String BUY_SERVICE_XIBI = HOST + "/v5/pay/xibimobile/XIBI/BuyService";//http://test.eapi.ciwong.com

    @Override
    public String getActionUrl(String action) {
        if (action.equalsIgnoreCase(USER_BALANCE)) {
            return action;
        } else if (action.equalsIgnoreCase(PASSWORD_VERIFY)) {
            return action;
        } else if (action.equalsIgnoreCase(CW_TN_URL)) {
            return action;
        } else if (action.equalsIgnoreCase(UNION_PAY_QUERY)) {
            return action;
        } else if (action.equalsIgnoreCase(GET_WEIXIN_UNIFIED_ORDER)) {
            return action;
        } else if (action.equalsIgnoreCase(GET_INSERT_USER_PAY_IN_RECORD)) {
            return action;
        } else if (action.equalsIgnoreCase(GET_ALIPAY_MOBILE_SIGN)) {
            return action;
        } else if (action.equalsIgnoreCase(GET_GET_RECHARGE_INFO)) {
            return action;
        } else if (action.equalsIgnoreCase(GET_UNIFIED_ORDER)) {
            return action;
        } else if (action.equalsIgnoreCase(SET_EPAGE_SERVICE_ORDER)) {
            return action;
        } else if (action.equalsIgnoreCase(SET_EPAGE_SERVICE_ORDER_BY_COUPON)) {
            return action;
        } else if (action.equalsIgnoreCase(BUY_SERVICE_XIBI)) {
            return action;
        }
        return null;
    }

}
